Skip to content

feature: allow hooks to override nested struct type#183

Open
iamtakingiteasy wants to merge 1 commit intogo-viper:mainfrom
iamtakingiteasy:hookfield
Open

feature: allow hooks to override nested struct type#183
iamtakingiteasy wants to merge 1 commit intogo-viper:mainfrom
iamtakingiteasy:hookfield

Conversation

@iamtakingiteasy
Copy link
Copy Markdown

@iamtakingiteasy iamtakingiteasy commented Mar 21, 2026

Re-implementation of #43, #36

Currently hooks are only queried after target type for nested struct is determined which cannot be changed from map, this MR introduces hook dispatch early at struct field processing, allowing to replace field with type other than map.

Main use-case is rendering time.Time (which is a struct with no exported fields) as a string.

Partially addresses #165 (at least allows proposed hook solution to function as expected).

Changes conflict with #176, a rebase of other will be necessary if either is merged.

Signed-off-by: Alexander Tumin <iamtakingiteasy@eientei.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant